#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include <QWidget>
#include <QTimer>
#include <QDate>

#include "../base/baseview.h"
#include "maindata.h"
#include "toolwidget.h"

namespace Ui {
class MainView;
}

class MainView :public BaseView, public Observer
{
    Q_OBJECT

public:
    explicit MainView(QWidget *parent = nullptr);
    virtual void init() override;
//    virtual void showView() override;
//    virtual void hideView() override;
    virtual void update(QSharedPointer<Data> dataPtr) override;
    ~MainView() override;

public slots:
    void onCurTimeout();
private:
    Ui::MainView *ui;
    QTimer* m_curTimer; // 用于显示时间标签的计时器
    ToolWidget* m_toolBtn;
};

#endif // MAINWIDGET_H
